<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			#wrap{
				position: absolute;
				left: 0;
				top: 0;
				right: 0;
				bottom: 0;
				margin: auto;
				width: 300px;
				height: 300px;
				border: 1px solid;
				
				perspective: 200px;
			}
			
			#wrap > .box{
				position: absolute;
				left: 0;
				top: 0;
				right: 0;
				bottom: 0;
				margin: auto;
				width: 100px;
				height: 100px;
				transition:3s ;
				transform-style: preserve-3d;
				transform-origin: center center -50px; 
			}
			#wrap > .box > div{
				position: absolute;
				width: 100px;
				height: 100px;
				background: pink;
				text-align: center;
				font: 50px/100px "微软雅黑";
				transform-origin: center center -50px;
				backface-visibility: hidden;
			}
			#wrap > .box > div:nth-child(6){
				transform: rotateX(270DEG);
			}
			#wrap > .box > div:nth-child(5){
				transform: rotateX(90DEG);
			}
			#wrap > .box > div:nth-child(4){
				transform: rotateY(90DEG);
			}
			#wrap > .box > div:nth-child(3){
				transform: rotateY(270DEG);
			}
			#wrap > .box > div:nth-child(2){
				transform: rotateY(180DEG) rotate(180DEG);
			}
			#wrap > .box > div:nth-child(1){
			}
			
			#wrap:hover > .box{
				transform: rotateX(180DEG);
			}
		</style>
	</head>
	<body>
		<div id="wrap">
			<div class="box">
				<div>前</div>
				<div>后</div>
				<div>左</div>
				<div>右</div>
				<div>上</div>
				<div>下</div>
			</div>
		</div>
	</body>
</html>
